package net.lgy.config;


import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.info.License;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Mapper;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@Configuration
@Slf4j
@EnableTransactionManagement
@MapperScan("net.lgy.mapper")
public class Knife4jConfig {


    @Bean
    public OpenAPI openApi() {
        log.info("knife4j启动");
        return new OpenAPI().info(new Info().title("AI智能化云盘API").description("AI网盘系统")
                .termsOfService("http://www.lgy-cloud/PersonalIntroduce")
                .license(new License().name("Apache 2.0").url("http://www.lgy-cloud/PersonalIntroduce"))
                // 添加作者信息
                .contact(new Contact()
                        .name("日落前的星星") // 替换为作者的名字
                        .email("2660411178@qq.com") // 替换为作者的电子邮件
                        .url("http://www.lgy-cloud/PersonalIntroduce") // 替换为作者的网站或个人资料链接
                )
        ) ;
    }


}
